# Copyright (c) 2018 Presto Labs Pte. Ltd.
# Author: xguo

from coin.exchange.quoinex_v2.ws.subscriber import QuoinexSubscriber
from coin.exchange.quoinex_v2.ws.single_channel_subscriber import (
    QuoinexSingleChannelMultiSubscriberWrapper,)
from coin.strategy.mm.feed_builder import (
    QuoinexFlowBookBuilder,
    QuoinexSingleChannelFlowBookBuilder,
)
from coin.strategy.mm.base.feed import BaseFeedSubsystem
from coin.strategy.mm.subscription import SubscriptionRequest


class QuoinexFeedSubsystem(BaseFeedSubsystem):
  FeedSubReq = SubscriptionRequest('Spot', 'Quoinex', None)
  FeedSubscriber = QuoinexSubscriber
  FlowBookBuilder = QuoinexFlowBookBuilder


class QuoinexSingleChannelFeedSubsystem(BaseFeedSubsystem):
  FeedSubReq = SubscriptionRequest('Spot', 'Quoinex', 'single_channel')
  FeedSubscriber = QuoinexSingleChannelMultiSubscriberWrapper
  FlowBookBuilder = QuoinexSingleChannelFlowBookBuilder

  def _init_subscriber(self):
    return super()._init_subscriber(subscriber_group_id='TBD')
